require "erb"
require "MyUtil"

class ErbMan
  @@hash = {
    :login=>"login.erb",
    :main=>"main.erb",
    :folder_list=>"folder_list.erb",
    :rate_list=>"rate_list.erb",
    :subscribers_list=>"subscribers_list.erb",
    :modified_list=>"modified_list.erb",
    :feed_list=>"feed_list.erb",
    :feed_view=>"feed_view.erb"
#    :history_view=>"history_view.erb"
  }

  def initialize(user_agent=nil)

  end

  def erb(view)
    open( "erb/default/" + @@hash[view]){|f|
      erb = ERB.new(  f.read)
    }
  end

  def result(view, b)
    erb(view).result(b)
  end
end
